<link rel="stylesheet" href="../addons/jy_merch/css/mobile.css?v=6">
<style>
.fui-cell-group .fui-cell .fui-cell-info select {
	padding: 0.3rem 0.4rem;
    background-color: #f7f7f7;
    border-radius: 0.15rem;
    height: auto;
    line-height: 1.41176471;
}
</style>
<div class='fui-page fui-page-current'>
    <div class="fui-header fui-header-success" style="background:{{main.syscolor||'#05c175'}}">
        <div class="fui-header-left">          
        </div>
        <div class="title">商品编辑</div>
        <div class="fui-header-right"></div>
    </div>
    <div class='fui-content'>
        <div class="fui-cell-group">
            <div class="fui-cell ">
                <div class="fui-cell-label ">商品名称</div>
                <div class="fui-cell-info">
                    <textarea rows="2" placeholder="请输入商品名称" ng-model="pagedata.item.title" id="title"></textarea>
                </div>
            </div>
            <div class="fui-cell">
                <div class="fui-cell-label">副标题</div>
                <div class="fui-cell-info">
                    <input type="text" placeholder="请输入商品副标题" class="fui-input" ng-model="pagedata.item.subtitle"   id="subtitle" />
                </div>
            </div>
			<div class="fui-cell">
				<label class="fui-cell-label">小店分类</label>
				<div class="fui-cell-info" style="padding-right:0.5rem">
					<select ng-model="pagedata.item.pcate2">
							<option value="" selected="selected">一级分类</option>
							<option ng-repeat="(value,data) in pagedata.pcates" value="{{data.id}}" ng-selected="pagedata.item.pcate2==data.id">{{data.title}}</option>
					</select>
				</div>
				<div class="fui-cell-info">
							<select ng-model="pagedata.item.ccate2">
							<option value="" selected="selected">二级分类</option>
							<option ng-repeat="(value,data) in pagedata.pcates[pagedata.item.pcate2].cid" value="{{data.id}}" ng-selected="pagedata.item.ccate2==data.id">{{data.title}}</option>
							</select>			
				</div>
			</div>
			<div class="fui-cell">
                <div class="fui-cell-label">商品首图</div>
                <div class="fui-cell-info">
                    <div class="fui-list jump">
								<a class="fui-list-media" ng-if="pagedata.item.image">
									<img class="round" src="{{tomedia(pagedata.item.image) || '../core/resource/images/nopic.jpg'}}" />
								</a>
								<a class="fui-list-media weui_uploader_input_wrp">
									<input class="weui_uploader_input" ng-click="image(pagedata.item,'image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
								</a>
					</div>
				</div>
            </div>
			<div class="fui-cell">
                <div class="fui-cell-label">商品多图</div>
                <div class="fui-cell-info">
					<div class="weui_uploader">
                        <div class="weui_uploader_bd" style="margin-bottom:0">
                            <ul class="weui_uploader_files">
                                <li ng-repeat="p in pagedata.item.images" class="weui_uploader_file" style="background-image:url('{{tomedia(p)}}')">
									<div class="upbtn" >
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.item.images.splice($index-1,0,p);pagedata.item.images.splice($index+1,1)">上移</a>
										<a style="color:#f60" href="javascript:;" ng-click="pagedata.item.images.splice($index,1)">删除</a>
									</div>
								</li>
                            </ul>
                            <div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.item,'images')"></div>
                        </div>
                    </div>
				</div>
            </div>	
        </div>     
        <div class="fui-cell-group">
            <div class="fui-cell">
                <div class="fui-cell-label">商品排序</div>
                <div class="fui-cell-info">
                    <input  placeholder="数字越大，排名越靠前" class="fui-input" ng-model="pagedata.item.paixu"/>
                </div>
            </div>
      
		<div class="fui-cell">
                <div class="fui-cell-label ">商品详情</div>
                <div class="fui-cell-info">
                    <textarea rows="6" placeholder="请输入商品详情" ng-model="pagedata.item.content" id="title"></textarea>
                </div>
        </div>
		</div>
        <div class="fui-title center">更多设置请至PC端后台</div>
    </div>

    <div class="fui-navbar">
        <div ng-click="post(pagedata.item,'post')" class="nav-item btn btn-success btn-submit">保存</div>
    </div>


</div>
